/*-----------------------------
----$Source: Volumes://MATEOR/vais/modules/lmath/lmath.c$
----$Date: June 30, 2012$
-------------------------------
VAIS Copyright Matthew Caswell, 2012
-----------------------------*/
#include<stdlib.h>
#include<vais.h>
#include<lmath.h>

int quadratic (int a, int b, int c, int x){
  int r = ((a * x)^2) + (b * x) + c;
  
  return (r);
}

point_t* initPointOrigin (void){
  point_t* p = malloc (sizeof (*p));
  
  (*p).x = (*p).y = 0;
  
  return (p);
}

point_t* h_Point (int n, int x, int y){
  point_t* p = malloc (sizeof (*p));
  if(n == 0){
    p = initPointOrigin ();
  }else{
    (*p).x = x;
    (*p).y = y;
  }

  return (p);
}